package com.guqj.basis.spi;

public class SpiTest extends SpiParent {

	// @Test
	/*
	 * public void spiTest(){ ServiceLoader<HelloService>
	 * helloServiceLoader=ServiceLoader.load(HelloService.class);
	 * for(HelloService item:helloServiceLoader){ item.sayHello(); } }
	 */

	{
		System.out.println("child normal block");
	}

	static {
		System.out.println("child static block");
	}

	public SpiTest() {
		super();
		System.out.println("child Construct block");
	}

	public static void main(String[] args) throws InterruptedException {
		Thread.sleep(0);
		new SpiTest();
	}
}

class SpiParent {

	{
		System.out.println("parent normal block");
	}

	static {
		System.out.println("parent static block");
	}

	public SpiParent() {
		System.out.println("parent Construct block");
	}
}
